package com.bjpowernode.springboot.service.impl;

import com.bjpowernode.springboot.dao.StudentMapper;
import com.bjpowernode.springboot.entity.Student;
import com.bjpowernode.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;


    @Override
    public Student queryStudentById(int id) {
        return studentMapper.queryStudentById(id);
    }

    @Override
    public int updateStudentById(Student student) {
        int i = studentMapper.updateStudentById(student);
        int a = 10 / 0;
        return i;
    }
}
